package org.apache.ibatis.demo.bean;

import org.apache.ibatis.demo.handler.MyAmount;

import java.io.Serializable;

/**
 * User
 *
 * @author zhaohui
 * @date 2019/8/27 20:56
 */
public class User implements Serializable {

    private Long id;

    private String name;

    private String idCard;

    private String bankCard;

    private int gender;

    private MyAmount amount;

    /**
     * 只读字段
     */
    private String onlyReadField;

    public User() {
    }

    public User(Long id, String onlyReadField) {
        this.id = id;
        this.onlyReadField = onlyReadField;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getBankCard() {
        return bankCard;
    }

    public void setBankCard(String bankCard) {
        this.bankCard = bankCard;
    }

    public int getGender() {
        return gender;
    }

    public void setGender(int gender) {
        this.gender = gender;
    }

    public MyAmount getAmount() {
        return amount;
    }

    public void setAmount(MyAmount amount) {
        this.amount = amount;
    }

    public String getOnlyReadField() {
        return onlyReadField;
    }

    public void setOnlyReadField(String onlyReadField) {
        this.onlyReadField = onlyReadField;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", idCard='" + idCard + '\'' +
                ", bankCard='" + bankCard + '\'' +
                ", gender=" + gender +
                ", amount=" + amount +
                ", onlyReadField='" + onlyReadField + '\'' +
                '}';
    }
}
